﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
	<CustomAction
			Id="Ribbon.DialogHelper.Script"
			Location="ScriptLink"
			ScriptSrc="/_layouts/BoldBrick.SharePoint.CommonControls/JS/DialogHelper.js"
	/>
	<CustomAction
		Id="Ribbon.Candidates.Script"
		Location="ScriptLink"
		ScriptSrc="/_layouts/BoldBrick.OneIntranet.HR/JS/Candidates.js"
	/>
	<CustomAction Id="Ribbon.Candidates.StartHRWorkflow"
		RegistrationId="0x012000C8135A5605D92B4BAF6422F43D086144"
		RegistrationType="ContentType"
		Location="CommandUI.Ribbon"
		Title="$Resources: BoldBrick.OneIntranet.HR, Ribbon_Candidates_StartHRWorkflow"
	>
		<CommandUIExtension>
			<CommandUIDefinitions>
				<CommandUIDefinition Location="Ribbon.ListItem.Workflow.Controls._children">
					<Button Id="Ribbon.Candidates.StartHRWorkflow.Button"
							LabelText="$Resources: BoldBrick.OneIntranet.HR, Ribbon_Candidates_StartHRWorkflow_LabelText"
							TemplateAlias="o1"
							Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-48" Image16by16Left="-208"
							Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="-192" Image32by32Left="-416"
							Sequence="31"
							Command="Command.Ribbon.Candidates.StartHRWorkflow" />
				</CommandUIDefinition>
			</CommandUIDefinitions>
			<CommandUIHandlers>
				<CommandUIHandler Command="Command.Ribbon.Candidates.StartHRWorkflow"
					CommandAction="javascript:ShowDialog('{SiteUrl}/_layouts/BoldBrick.OneIntranet.HR/StartHRWorkflowPage.aspx?', escape(window.location), '{ListId}', SP.ListOperation.Selection.getSelectedItems(), 0);"
					EnabledScript="javascript:CanShowStartHRWorkflow();"
				/>
			</CommandUIHandlers>
		</CommandUIExtension>
	</CustomAction>
</Elements>